<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript">
function del()
{
  if(window.confirm("do you really want to delete it?"))
  {
  return true;
  }
  return false;
}


</script>
<body>
<h1 align="center"><font color="red">User List</font></h1>

<table border="1" width="80%" align="center">
<tr>

<td>id
</td>

<td>firstname
</td>

<td>lastname
</td>

<td>age
</td>

<td>Delete
</td>

<td>Update
</td>
</tr>
<s:iterator value="#request.list" id="us">
<tr>
<td><s:property value="#us.id"></s:property>
</td>

<td><s:property value="#us.firstname"></s:property>
</td>

<td><s:property value="#us.lastname"></s:property>
</td>

<td><s:property value="#us.age"></s:property>
</td>

<td><s:a href="deleteUser.action?user.id=%{#us.id}" onclick="return del();">Delete</s:a>
</td>

<td><s:a href="updatePUser.action?user.id=%{#us.id}">Update</s:a>
</td>
</tr>
</s:iterator>
</table>
</body>
</html>